﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Web.group
{
    public partial class sysroleadd : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_save_Click(object sender, EventArgs e)
        {
            Hashtable user = PhoneBook.Users.Users.get(Commons.StrUtil.FormatValue(Session["userid"]));

            Hashtable sysrole = new Hashtable();
            sysrole["rolename"] = txb_rolename.Text;
            sysrole["description"] = txb_description.Text;
            sysrole["groupid"] = user["groupid"];

            PhoneBook.Manage.SysRole.add(sysrole);
            AddLog("新添加了角色：{0}", sysrole["rolename"]);
            Helper.ShowMessage(u_message, controls.UCMessageType.success, "保存成功");
        }   
    }
}